home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-25 | 1.2 KB | 57 lines | [TEXT/MPS ] |
- {[a-,body+,h-,o=100,r+,rec+,t=4,u+,#+,j=20/57/1$,n-]}
- { CalcUtilities.p}
- { Copyright © 1986-1990 by Apple Computer, Inc. All rights reserved.}
-
- {
- This unit contains some utility routines for the Calc sample application.
- It demonstrates how to use a library unit in a MacApp™ application.
- }
-
- UNIT CalcUtilities;
-
- INTERFACE
-
- USES UMacApp;
-
- { Formatting and Drawing routines }
-
- PROCEDURE FitString(VAR theString: Str255;
- maxWidth: INTEGER);
-
- FUNCTION IsDigit(Ch: CHAR): BOOLEAN;
-
- PROCEDURE SetEditCmdName(theCommand, customCommand: INTEGER);
-
- PROCEDURE SetTheFont(fontNumber, fontSize: INTEGER;
- fontStyle: Style);
-
- PROCEDURE SmartDrawString(theString: Str255;
- area: Rect;
- justification: INTEGER);
-
- { Reading and Writing }
-
- PROCEDURE ReadBytes(theRefNum: INTEGER;
- size: LONGINT;
- buffer: Ptr);
-
- PROCEDURE WriteBytes(theRefNum: INTEGER;
- size: LONGINT;
- buffer: Ptr);
-
- PROCEDURE ReadScrap(theScrap: Handle;
- VAR scrapOffset: LONGINT;
- theData: Ptr;
- dataLength: INTEGER);
-
- PROCEDURE WriteScrap(theScrap: Handle;
- VAR scrapOffset: LONGINT;
- theData: Ptr;
- dataLength: INTEGER);
-
- IMPLEMENTATION
-
- {$I $$Shell(SrcApp)CalcUtilities.inc1.p}
-
- END.
-